package cn.edu.scau.cmi.longyuanjun.consistentCompositePattern;


public class WholePC extends Composite{
private String description = "This is a computer(include all of the parts)!";
	
	public WholePC() {
		ComputerParts cPU = new CPU();
		ComputerParts memory = new Memory();
		ComputerParts hardDisk = new HardDisk();
		ComputerParts driveController = new DriveController();
	
		super.attach(cPU);
		super.attach(memory);
		super.attach(hardDisk);
		super.attach(driveController);
	}
	
	@Override
	public String getDescription() {
		return description;
	}
	
	public double getPricre() {
		return super.getPrice();
	}

}
